// 西药房房 接口相关的函数
import request from "@/untils/request.js"

/**
 *
 *  post
 *
 */

// 添加西药房其他入库
export const dugDocInsert = (data) => {
    return request.post("/outpatient/dugDoc/insert", data)
}

// 修改西药房其他入库
export const editdugDoc = (data) => {
    return request.post("/outpatient/dugDoc", data)
}

// 修改西药房其他出库
export const editdugRetn = (data) => {
    return request.post("/outpatient/dugRetn", data)
}

// 添加西药房其他退库
export const dugRetnInsert = (data) => {
    return request.post("/outpatient/dugRetn/insert", data)
}
// 新增西药房品调拨
export const Adddpurcallocate = (data) => {
    return request.post("/outpatient/dpurcallocate", data)
}
// 西药房其他入库提交审核过单
export const dugDoctoExamine = (data) => {
    return request.post("/outpatient/dugDoc/toExamine", data)
}
// 西药房其他出库提交审核过单
export const dugRetnExamine = (data) => {
    return request.post("/outpatient/dugRetn/toExamine", data)
}
// 新增西药房库存预警-保存
export const AddpharmacyAlert = (data) => {
    return request.post("/outpatient/pharmacyAlert", data)
}
// // 新增西药房库存预警-保存
// export const AddpharmacyAlert = (data) => {
//     return request.post("/outpatient/pharmacyAlert", data)
// }
// 西药房盘点-点击草稿录入可以修改里面得数据
export const WesternPdsk = (data) => {
    return request.post("/outpatient/phar/update", data)
}
// 西药房盘点
export const WesternPdinsert = (data) => {
    return request.post("/outpatient/phar/insert", data)
}
/**
 *
 * get
 *
 */

// 点击批次号显示
export const getBatchNumber = (params) => {
    return request.get("/outpatient/dugdpurctable/getBatchNumber", {params})
}
// 点击效期调整
export const getExpyDate = (params) => {
    return request.get("/outpatient/dugdpurctable/getExpyDate", {params})
}
// 更新有效日期
export const updateDate = (params) => {
    return request.get("/outpatient/dugdpurctable/updateDate", {params})
}
// 西药房明细流向记录
export const dugChgPage = (params) => {
    return request.get("/outpatient/dugChg/page", {params})
}
// 西药房盘点提交审核
export const pharskCheck = (params) => {
    return request.get("/outpatient/phar/check", {params})
}
// 西药房盘点点击查看或者草稿操作
export const getDrugSkVo = (params) => {
    return request.get("/outpatient/phar/getDrugSkVo", {params})
}
// 西药房库存预警列表
export const pharmacyAlertList = (params) => {
    return request.get("/outpatient/pharmacyAlert/list", {params})
}
// 设置西药房库存预警数量列表
export const pharmacyAlert = (params) => {
    return request.get("/outpatient/pharmacyAlert/pages", {params})
}
// 西药房出库，选择要出库的药品
export const dugRetnList = (params) => {
    return request.get("/outpatient/dugRetn/list", {params})
}
// 用于新建计划采购选择药品
export const getWare = (params) => {
    return request.get("/outpatient/getWare", {params})
}
// 西成药目录列表
export const getDrugList = (params) => {
    return request.get("/outpatient/getDrugList", {params})
}
// 西药房其他入库列表 = > 分页
export const dugDocPage = (params) => {
    return request.get("/outpatient/dugDoc/page", {params})
}
// 西药房出库列表 = > 分页
export const dugRetnPage = (params) => {
    return request.get("/outpatient/dugRetn/page", {params})
}
// 西药房其他出库详情页
export const getDrugRetnList = (params) => {
    return request.get("/outpatient/dugRetn/getDrugRetnList", {params})
}
// 西药房房库存列表详情
export const dugDocgetDrugDetails = (params) => {
    return request.get("/outpatient/dugDoc/getDrugDetails", {params})
}
// 西药房盘点列表-分页
export const WesternpharPage = (params) => {
    return request.get("/outpatient/phar/page", {params})
}
// 西药房盘点列表-删除
export const deleteDugSk = (params) => {
    return request.get("/outpatient/phar/deleteDugSk", {params})
}

// 西药房房库存列表-分页
export const dugdpurctablePage = (params) => {
    return request.get("/outpatient/dugdpurctable/page", {params})
}
/**
 *
 * DELETE
 *
 */
// 西药房其他入库草稿删除
export const deleteDoc = (params) => {
    return request.delete("/outpatient/dugDoc/deleteDoc", {params})
}
// 西药房其他出库草稿删除
export const deleteRetn = (params) => {
    return request.delete("/outpatient/dugRetn/deleteRetn", {params})
}

/*
	Others
*/

// 西药房效期统计接口
export const WestExpireWarn = (params) => {
    return request.get("/outpatient/dugdpurctable/expireWarn", {params})
}

// 入库方式
export const dugDocPutin = (params) => {
    return request.get("/outpatient/dugDoc/selectPutin", {params})
}
// 出库方式
export const selectOut = (params) => {
    return request.get("/outpatient/dugRetn/selectOut", {params})
}
// 供应商下拉列表
export const selectDropDownList = (params) => {
    return request.get("/outpatient/selectDropDownList", {params})
}
// 获取采购计划
export const getPlan = (params) => {
    return request.get("/outpatient/getPlan", {params})
}
// 获取药品加成率 => 西药
export const getDocMark = (params) => {
    return request.get("/outpatient/docMark/page", {params})
}
// 暴露
export default {
    // 西药目录药品档案列表
    getDrugList, getWare, getDocMark, getBatchNumber, getExpyDate, updateDate,
    // 西药房盘点
    WesternPdsk, pharskCheck, getDrugSkVo, WesternPdinsert,deleteDugSk,
    // 西药房其他入库
    dugDocPage, dugDoctoExamine, dugDocgetDrugDetails, dugRetnList, deleteDoc, editdugDoc,
    // 西药房其他出库
    editdugRetn, deleteRetn,
    // 西药房采购退库
    dugRetnPage, dugRetnInsert,
    // 西药房库存 ： 入库 =>
    dugdpurctablePage, dugDocInsert,
    // 西药房库存预警列表
    pharmacyAlertList, AddpharmacyAlert, pharmacyAlert, dugChgPage,
    // 出入库方式
    dugDocPutin, selectOut, dugRetnExamine, getDrugRetnList,
    // Others
    selectDropDownList, getPlan, WestExpireWarn
}